package com.backend.modules.statistics.vo;

import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;

import java.util.List;

@Data
@Schema(description = "管理员统计数据")
public class AdminStatisticsVO {
    
    @Schema(description = "总览数据")
    private Overview overview;
    
    @Schema(description = "提交率排名")
    private List<DepartmentSubmitRate> submitRateRanking;
    
    @Schema(description = "近期提交趋势")
    private List<DailySubmitTrend> submitTrend;
    
    @Data
    public static class Overview {
        @Schema(description = "总任务数")
        private Integer totalTasks;
        
        @Schema(description = "总提交数")
        private Integer totalSubmissions;
        
        @Schema(description = "总学生数")
        private Integer totalStudents;
        
        @Schema(description = "总教师数")
        private Integer totalTeachers;
        
        @Schema(description = "平均提交率")
        private Double averageSubmitRate;
    }
    
    @Data
    public static class DepartmentSubmitRate {
        @Schema(description = "部门ID")
        private Long departmentId;
        
        @Schema(description = "部门名称")
        private String departmentName;
        
        @Schema(description = "提交率")
        private Double submitRate;
        
        @Schema(description = "应交数量")
        private Integer totalCount;
        
        @Schema(description = "已交数量")
        private Integer submittedCount;
        
        public DepartmentSubmitRate(Long departmentId, String departmentName, 
                Double submitRate, Long totalCount, Long submittedCount) {
            this.departmentId = departmentId;
            this.departmentName = departmentName;
            this.submitRate = submitRate;
            this.totalCount = totalCount.intValue();
            this.submittedCount = submittedCount.intValue();
        }
        
        public DepartmentSubmitRate() {
        }
    }
    
    @Data
    public static class DailySubmitTrend {
        @Schema(description = "日期")
        private String date;
        
        @Schema(description = "提交数量")
        private Integer submitCount;
        
        @Schema(description = "逾期数量")
        private Integer overdueCount;
    }
} 